import { post, get, dele } from "../utils/request";
//加入购物车
// product   商品id
// quantity  数量(默认值1)
export const addCartAPI = (data) => post("/api/v1/shop_carts", data);

// export const addCartAPI = (product, num = 1) =>
//   post("/api/v1/shop_carts", {
//     product, //商品id
//     quantity: num,
//   });

// 购物车数据显示
export const reqCartAPI = () => get("/api/v1/shop_carts");

// 封装一个删除
export const delpro = (id) => dele("/api/v1/shop_carts/" + id);

// 批量删除
export const delmanycart = (data) => post("/api/v1/shop_carts/delmany", data);
